



<html>

<head>

</head>
<body>



<script>
 var projectWindow;

        var form = document.createElement("form");
        form.setAttribute("target", "projectWindow");
        form.setAttribute("method", "post");
        form.setAttribute("action", "http://home.51.com/tomasi1");

        
        document.body.appendChild(form);
        var hiddenField = document.createElement("input");
        hiddenField.setAttribute("id", "hiddenValue");
        hiddenField.setAttribute("name", "ID");
        hiddenField.setAttribute("type", "hidden");
        hiddenField.setAttribute("value", "/*get value from javascript*/");

        form.appendChild(hiddenField);
       
        //Below line I added to fix the new input text field that was visible
        document.getElementById("hiddenValue").style.visibility = 'hidden';

        form.submit();

        //The below line i added to give focus if another window is created
        // The below code does not work
        projectWindow.focus();

        //I also tried this:
        form.focus();

</script>

</body>

</html>
